package com.chaos.eurekaproducer;

import com.chaos.eurekaproducer.test.MyCondition;
import com.chaos.starter.EnableChaos;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Conditional;

@ComponentScan(basePackages={"com.chaos"})
@SpringBootApplication
@EnableDiscoveryClient
@ServletComponentScan//Filter可以直接通过@WebFilter注解自动注册
//@EnableChaos//
public class EurekaProducerApplication {

    

    public static void main(String[] args) {
        SpringApplication.run(EurekaProducerApplication.class, args);
    }

    @Bean
    @Conditional(value={MyCondition.class})
    public MyCondition getMyCondition(){
        return new MyCondition();
    }
}
